package com.ehotting.edsta.mqbd.api.enums;

public enum SysModuleEnum {

    PBC_DESIGN("pbcDesign","PCBA建模"),

    SIGNAL_ANALYSIS("signalAnalysis","信号完整性分析"),

    SIMULATION("simulation","多应力仿真自主引擎"),

    CAE("cae","第三方仿真软件"),
    CAEU("caeu","第三方仿真软件2"),


    RELIABILITY("reliability","多物理场仿真-腾睿自研"),

    CIRCUIT_DESIGN("circuitDesign","电路生成专家系统"),

    TESTABILITY("testability","测试性建模"),

    DRIVER_ADAPT("driverAdapt","驱动程序参数化"),

    DIAGNOSIS_PREDICT("diagnosisPredict","诊断预测算法生成");

    private String code;
    private String name;

    SysModuleEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static SysModuleEnum getByCode(String code){
        SysModuleEnum[] array = SysModuleEnum.values();
        for(SysModuleEnum channelType :array){
            if(channelType.getCode().equals(code)){
                return channelType;
            }
        }
        return  null;
    }

    public static SysModuleEnum getByName(String name){
        SysModuleEnum[] array = SysModuleEnum.values();
        for(SysModuleEnum channelType :array){
            if(channelType.getName().equals(name)){
                return channelType;
            }
        }
        return  null;
    }

}